package cn.edu.xmu.orderpayment.payment.util.baseobject;

import cn.edu.xmu.orderpayment.payment.model.bo.Refund;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author Yujie Lin
 * @date 2021/12/12 22:09
 */
@Data
public class RefundInfo {
    private String tradeSn;
    private String outTradeNo;
    private String refundNo;
    private Long amount;
    private LocalDateTime successTime;
    private Byte state;

    public Refund.State getState() {
        return Refund.State.getStateByCode(Integer.valueOf(state));
    }
    public void setState(Refund.State state) {
        this.state=state.getCode().byteValue();
    }
}
